import Vue from 'vue'
import dialogXH from './dialogXH' // 弹出框
import inputXH from './model/component/input/input.vue'

Vue.component('DialogXH', dialogXH)
Vue.component('InputXH', inputXH)

Vue.prototype.msgSuccess = function(msg) {
  this.$message({ showClose: true, message: msg, type: 'success' })
}
Vue.prototype.msgError = function(msg) {
  this.$message({ showClose: true, message: msg, type: 'error' })
}
Vue.prototype.msgInfo = function(msg) {
  this.$message.info(msg)
}

/**
 * 模态框关闭提示
 * @param done
 */
Vue.prototype.handleClose = function(done) {
  this.$confirm('确认关闭？')
    .then(_ => {
      done()
    })
    .catch(_ => {})
}
